package com.example.practical_training_projects.controller;

import com.example.practical_training_projects.entity.collect_articles;
import com.example.practical_training_projects.entity.praise_articles;
import com.example.practical_training_projects.service.praise_articlesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("praise")
public class praise_articlesController {
    @Autowired
    private praise_articlesService service;
    @PostMapping("addpraise")
    public java.lang.Integer insertpraise(Integer a_uid,Integer user_uid) {
        return service.insertpraise(a_uid,user_uid);
    }

    @GetMapping("checkpraise")
    public praise_articles checkpraise(Integer a_uid, Integer user_uid){
        return  service.checkpraise(a_uid,user_uid);
    }

    @GetMapping ("deletepraise")
    public Integer deletepraise(Integer a_uid, Integer user_uid){
        return service.deletepraise(a_uid,user_uid);
    }
}
